(function() {

	var appModule = angular.module('tracecashModule');
	
	appModule.controller('OperationListCtrl', ['$scope', '$rootScope', '$http', function($scope, $rootScope, $http) {
		/*
		$scope.initial = angular.copy($scope.sinisterSearchAction);
		$scope.clear = function() {
			angular.copy($scope.initial, $scope.sinisterSearchAction);
			$scope.form.$setPristine();
		};
		$scope.search = function() {
			$scope.setPage(1);
		};
		*/
		$scope.setPage = function(page) {
			$scope.currentPage = page;
			$http.get($rootScope.REST_PATH + '/transaction/find').success(function(data) {
				$scope.searchResults = data;
			});
		};
		$scope.setPage(1);
	}]);
	
});